<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html class=" -webkit-">
<head>		
	<meta charset="utf-8">
    <title>杰利联合</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
	<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
    <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
    <meta content="no-cache" http-equiv="pragma">
    <meta content="0" http-equiv="expires">
    <meta content="telephone=no, address=no" name="format-detection">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <link rel="stylesheet" type="text/css" href="${ctxStatic}/jiu/css/mobile_module.css?v=1493085388" media="all">
    <script type="text/javascript" src="${ctxStatic}/jiu/js/jquery-2.0.3.min.js"></script>
	<script type="text/javascript" src="${ctxStatic}/jiu/js/prefixfree.min.js?v=1493085388"></script>
	<script  type="text/javascript"	src="${ctxStatic}/jiu/js/zepto.min.js"></script>	
	<link href="${ctxStatic}/jiu/css/common.css?v=8" rel="stylesheet" type="text/css">	
</head>
<body>      
		<div class="top_tab">    		
  		<a style="position: absolute;left: 10px;top:15px" href="javascript:javascript:window.history.go(-1);"><img src="${ctxStatic}/jiu/img/fanhui.png" style="height: 20px;"/></a>
			<a href="#" style="font-size: 20px;">审核</a>			
		</div>
<div class="container">
  <div class="order_info">
     		<div class="order_list" style="border-bottom: 1px solid #ddd;
    margin-top: 10px;">							
					<div class="goods_item" style="min-height: 100px;">
						<img src="${jiuDefrayLog.tiHeadimgurl}" style="height: 80px;width: 80px;">
						<div class="info" style="margin-left: 20px;">
							<p class="name" style="font-size: 16px;">${jiuDefrayLog.tiRealName}</p>
							<p class="" style="font-size: 14px;">
								<span style="color: #787878;">金额</span>
								<span class="orange">￥${jiuDefrayLog.money}</span>
							</p>							
								<p style="margin-top: 15px;color: #787878;"><fmt:formatDate value="${jiuDefrayLog.createTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss" /></p>													
						</div>					
					</div>				
			</div>
	<p class="t" style="margin-bottom: 10px;">备注：${jiuDefrayLog.reason}</p>  
	<p class="order_remark" style="margin-bottom: 10px;">
      <textarea placeholder="添加备注" name="remark" id="remark"></textarea>
    </p>
    <a class="btn" href="javascript:submit(1)" >通过</a><br>
 	<a style="margin-bottom: 10px;" class="btn blue_btn" href="javascript:submit(2)" onclick="">驳回</a>
  </div>	 
</div>


	<script>
	window.alert = function(name){
	  var iframe = document.createElement("IFRAME");
	  iframe.style.display="none";
	  iframe.setAttribute("src", 'data:text/plain,');
	  document.documentElement.appendChild(iframe);
	  window.frames[0].window.alert(name);
	  iframe.parentNode.removeChild(iframe);
	 };
	 
	 window.confirm = function (message) {
	   var iframe = document.createElement("IFRAME");
	   iframe.style.display = "none";
	   iframe.setAttribute("src", 'data:text/plain,');
	   document.documentElement.appendChild(iframe);
	   var alertFrame = window.frames[0];
	   var result = alertFrame.window.confirm(message);
	   iframe.parentNode.removeChild(iframe);
	   return result;
	 };
	
	function submit(type){
		var examineRemarks=$('#remark').val();
		$.post("${ctxFront }/jiu/ajaxExamineDefray",{examineRemarks:examineRemarks,type:type,uid:"${uid}",defrayLogId:"${jiuDefrayLog.id}"},function(data){
           
			var jsonObj =JSON.parse(data);
			alert(jsonObj.message);
			if(jsonObj.msg=='success'){
				window.location.href="${ctxFront }/jiu/toDefrayList?uid=${uid}&v="+Math.random();
			}
		});
	}
	</script>
</body>
</html>
